<script setup lang="ts">
import { defineProps, defineEmits } from 'vue'

defineProps({
	visible: {
		type: Boolean,
		default: true
	},
	messageTitle: {
		type: String,
		default: '是否打包?'
	}
})

const emit = defineEmits(['onchange'])

const handleOk = () => {
	emit('onchange', false, true)
}

const handleCancel = () => {
	emit('onchange', false, false)
}
</script>

<template>
	<div>
		<a-modal
			v-model:visible="visible"
			@ok="handleOk"
			@cancel="handleCancel"
			ok-text="确认"
			cancel-text="取消"
			width="500px"
			centered
		>
			<div class="contentText">{{ messageTitle }}</div>
		</a-modal>
	</div>
</template>

<style lang="less">
.contentText {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}
</style>
